package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IWorkerCertificationService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 服务端 - 服务人员认证相关接口
 * @author: menghao
 * @version: 1.0
 * @Date: 2025/09/16 15:50
 * @Description:
 */
@RestController("workercertificationController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 服务人员认证相关接口")
public class WorkerCertificationController {
    @Resource
    private IWorkerCertificationService workerCertificationService;

    /**
     * 服务人员认证
     * @param dto
     */
    @PostMapping()
    public void workerCertificationAudit(@RequestBody WorkerCertificationAuditAddReqDTO dto) {
        workerCertificationService.workerCertificationAudit(dto);
    }

    /**
     * 获取认证拒绝原因
     * @return
     */
    @GetMapping("/rejectReason")
    public RejectReasonResDTO rejectReason() {
        return workerCertificationService.getRejectReason();
    }

}
